<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form th:action="@{/file/uploadfile}" method="post" enctype="multipart/form-data">
    <input type="file" name="image">
    <input type="submit" value="上传">
</form>
<!--
    1. 表单提交方式必须是post
    2. 表单的enctype属性必须为multipart/form-data
    3. 后台接受变量名字要与文件选择name属性一致
    4.action写Controller的方法的路径
-->

<hr/>
<a th:href="@{/file/download(fileName=examplefile.txt)}" href="/file/download?fileName=examplefile.txt">corejava.txt</a><span th:utext="${message}"></span>
